package cn.lecosa.spark.hive;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class BufferedWriterDemo {
	public static void write(String str) throws IOException {
		FileWriter fw = new FileWriter(new File("buf.sh"), false);

		BufferedWriter bufw = new BufferedWriter(fw);

//		for (int x = 0; x < 4; x++) {
			bufw.write(str);
			bufw.newLine();
			bufw.flush();
//		}

		bufw.close();
	}
	
	public static void main(String[] args) throws IOException {
		write("hello ");
	}
}
